package 牛牛的快递;

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        float a = in.nextFloat();
        String b = in.next();
        int res = 20;
        a--;
        while (a-- > 0) {
            res++;
        }
        if (b.equals("y")) {
            res += 5;
        }
        System.out.println(res);
    }
}
